home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / vdtj122b.zip / DEMO4.VDM < prev    next >
Text File  |  1992-11-30  |  4KB  |  111 lines

  1. RI(9)/VEDIT Family - Programming Features/
  2. M(H)            !Display header
  3.  
  4. YT/
  5. All VEDIT Family editors are heavily oriented towards programmers; most
  6. features are useful to the task of editing programs.  Several additional
  7. features are intended specifically for program editing.  These are described
  8. here.
  9.  
  10. /
  11.  
  12. M(K)
  13. 9XS(100)        !Need 9 line window
  14. M(W)            !Create instruction window; set attributes
  15. EZY            !Empty edit buffer
  16. EB demo4a.txt    !Load demo text
  17. 3L            !Goto line 4
  18. EP 2 1            !Enable auto-indent
  19. ES 13 1            !Enable Insert-mode
  20.  
  21. EE(1)
  22. B#K
  23. I/The key <Alt-F3> performs nested parentheses matching.  These parentheses
  24. can be any of the sets of characters: { and }, [ and ], < and >, ( and ).
  25. This function is especially useful for checking the syntax of "C" programs
  26. and VEDIT PLUS macros.
  27.  
  28. Press <Alt-F3>.  The cursor moves to the first parenthesis.  Press <Alt-F3>
  29. again.  The cursor now moves to the matching parenthesis.  Press it again.
  30. The cursor moves back to the original parenthesis.  Experiment.
  31.         --- Press <Esc> to continue ---/
  32.  
  33. B -V
  34. EE(@)
  35. V
  36.  
  37. EE(1)
  38. B#K
  39. I/VEDIT can automatically indent the lines of a structured program.  Two modes
  40. are available.  In the simplest mode, each new line is indented to the "indent
  41. margin" set with the keys <F7> and <F8>.  In "Auto-Indent" mode, preferred for
  42. programming, the new line is initially indented the same as the line above it.
  43. You can change this initial indent by pressing <F7> or <F8>.
  44.  
  45. Press <Enter> while in "Insert" mode.  Notice how the new line is immediately
  46. indented.  Type a line of text.  Press <Enter> again.  Now press <F7> and <F8>
  47. to change the indent.  Experiment.    --- Press <Esc> to continue ---/
  48.  
  49. B -V
  50. EE(@)
  51. B 21L $N"|>"        !Move to end of an indented line
  52. V
  53.  
  54. EE(1)
  55. B#K
  56. I\An entire block of text can be re-indented by simply highlighting the block,
  57. positioning the cursor anywhere within the block and and pressing <F7> and/or
  58. <F8> as desired.  Try it:
  59.  
  60. Move the cursor anywhere on the first line to be re-indented. Press <F9> to
  61. start highlighting.  Move the cursor anywhere on the last line of the block.
  62. Press <F9> again.  Press <F8> and all lines in the block are indented an
  63. additional 4 columns.  Experiment with <F7> and <F8>.  Press <Ctrl-C> to
  64. remove the highlighting.    --- Press <Esc> to continue ---\
  65.  
  66. B -V
  67. EE(@)
  68. V
  69.  
  70. EZY            !Empty edit buffer
  71. EB demo4b.txt    !Read next demo file
  72. 6L            !Goto line 7
  73. EP 4 2            !Enable conditional LC to UC conversion
  74. ES 3 0            !Disable auto-indent
  75. 1YML            !Reset left margin
  76.  
  77. EE(1)
  78. B#K
  79. I/Many assembly language programmers prefer to have their labels, opcodes and
  80. operands in upper case letters and their comments in upper and lower case, as
  81. above.  To speed assembly language editing, VEDIT can automatically convert
  82. all letters left of the comment ";" to upper case.
  83.  
  84. Edit the assembly language code above.  Notice how letters typed in lower case
  85. are automatically converted to upper case when the cursor is to the left of
  86. the ";" comment character.   Try entering new lines of code.  Experiment.
  87.         --- Press <Esc> to continue ---/
  88.  
  89. B -V
  90. EE(@)
  91. V
  92.  
  93. EE(1)
  94. B#K
  95.  
  96. I/VEDIT has options for explicitly displaying Tab characters and the end of
  97. lines.  Both are normally displayed with (invisible) spaces, but can be
  98. changed.
  99.  
  100. Access the {CONFIG, Screen display} sub-menu.  Change the "Newline display
  101. character" to 17 and the "Tab display character" to 250.  Press <Ctrl-C> to
  102. exit the menu system.  Notice how the screen display has changed.  VEDIT also
  103. has "display modes" that control how other control and graphics characters are
  104. displayed.        --- Press <Esc> to return to the Main Menu ---/
  105.  
  106. B -V
  107. EE(@)
  108. V
  109. EP 8 32        !Restore newline display char
  110. EP 9 32        !Restore tab display char
  111.